import java.util.Scanner;

public class arraydemo3 {
    public static void main(String[] args) {
        Scanner sc =new Scanner(System.in);
        System.out.println("请输入数组数据个数:");
        int a = sc.nextInt();
        int[] arr = new int[a];

        System.out.println("请输入数组数据:");
        for (int i = 0; i < a; i++) {
        arr[i] = sc.nextInt();
        }
        int max = arr[0];

        for (int i = 0; i <a; i++) {
            if (max<arr[i]){
                max=arr[i];
            }
        }
        System.out.println("数组的最大值为:"+max);
    }
}
